from django.urls import path,re_path
from rest_framework_simplejwt.views import TokenObtainPairView,TokenRefreshView,TokenVerifyView
from apps.users.views import CreateUserViews,RegisterViews,MobileApiView,SmsApiView

urlpatterns = [
    # 获取token
    path('jwt/access/',TokenObtainPairView.as_view()),
    # 刷新touekn
    path('jwt/refresh/',TokenRefreshView.as_view()),
    # 校验token
    path('jwt/verify/',TokenVerifyView.as_view()),

    path('createuser/',CreateUserViews.as_view()),

    #  注册
    path('register/', RegisterViews.as_view()),

    # 校验手机号是否重复
    re_path('^mobile/(?P<mobile>1[3-9]\d{9})/', MobileApiView.as_view()),

    # 获取手机验证码
    re_path('^sendsms/(?P<mobile>1[3-9]\d{9})/$', SmsApiView.as_view()),

]


